<?php error_reporting(E_ALL^E_NOTICE^E_WARNING); ?>
<?php
	$select = "SELECT `id`, `url` FROM `d_url` WHERE `url` = '$url'";
	//获取域名或主机地址 
	$host = $_SERVER['HTTP_HOST']; 
	//获取目录
	$path = $_SERVER['PHP_SELF'];
	$path = str_replace("index.php","",$path);
	$result = $db->query($select,$con);
	$show = $db->fetch_arr($result);
	$d_url = $host.$path."?id=".$show[id];
	
	$db->close();
	//print_r($d_url);
?>

短网址为：<?php echo $d_url ?>
